package com.example.zhinongbao.Fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.zhinongbao.R;

public class NewsFragment extends Fragment {
    private static final String ARG_CATEGORY = "category";

    public NewsFragment(String category) {
        Bundle args = new Bundle();
        args.putString(ARG_CATEGORY, category);
        setArguments(args);
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        // 这里应该返回您的Fragment布局
        return inflater.inflate(R.layout.fragment_news, container, false);
    }
}